<?php

$dir = "/home/u12049/public/fileadmin/lifein/photos/";
$dir = "../../../../../../fileadmin/lifein/photos/";
// $dir = "/";
echo ($dir) . "<br>";
$i = 0;

if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
		$i++;
			if(filetype($dir . $file) == 'file') {
				echo "fichier : $file : \n<br />";
				$exif = exif_read_data($dir . $file, 0, true);
				
				foreach ($exif as $key => $section) {
					foreach ($section as $name => $val) {
						if($name != 'MakerNote') {
							echo "$key.$name: ";
							if(is_array($val)) {
								print_r($val); 
							} else {
								echo "$val";
							}
							echo "<br />\n";
						}
					}
				}
				/*
				
IFD0.Make: NIKON
IFD0.Model: COOLPIX P7100

EXIF.FocalLength: 60/10
EXIF.FocalLength: 350/10
EXIF.FocalLengthIn35mmFilm: 28
EXIF.FocalLengthIn35mmFilm: 52
IFD0.Software: ACDSee Pro 6
				
			
GPS.GPSVersion: 33685504
GPS.GPSLatitudeRef: N
GPS.GPSLatitude: Array
GPS.GPSLongitudeRef: E
GPS.GPSLongitude: Array
GPS.GPSAltitudeRef: 0
GPS.GPSAltitude: 158475/100
*/			
				echo "<hr>";
			}
		// if($i == 2) { exit; }
        }
        closedir($dh);
    }
} 


